home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / Patches.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  3.0 KB  |  114 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Patches.p
  3.  
  4.      Contains:    Patch Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18.  
  19. {$IFC UNDEFINED UsingIncludes}
  20. {$SETC UsingIncludes := 0}
  21. {$ENDC}
  22.  
  23. {$IFC NOT UsingIncludes}
  24.  UNIT Patches;
  25.  INTERFACE
  26. {$ENDC}
  27.  
  28. {$IFC UNDEFINED __PATCHES__}
  29. {$SETC __PATCHES__ := 1}
  30.  
  31. {$I+}
  32. {$SETC PatchesIncludes := UsingIncludes}
  33. {$SETC UsingIncludes := 1}
  34.  
  35. {$IFC UNDEFINED __MACTYPES__}
  36. {$I MacTypes.p}
  37. {$ENDC}
  38.  
  39.  
  40. {$PUSH}
  41. {$ALIGN MAC68K}
  42. {$LibExport+}
  43.  
  44. {$IFC TARGET_OS_MAC }
  45.  
  46. CONST
  47.     kOSTrapType                    = 0;
  48.     kToolboxTrapType            = 1;
  49.  
  50.  
  51. TYPE
  52.     TrapType                            = SignedByte;
  53.  
  54. CONST
  55.     OSTrap                        = 0;                            {  old name  }
  56.     ToolTrap                    = 1;                            {  old name  }
  57.  
  58. {
  59.     GetTrapAddress and SetTrapAddress are obsolete and should not
  60.     be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  61.     The old routines will not be supported for PowerPC apps.
  62. }
  63. {$IFC TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM }
  64. FUNCTION GetTrapAddress(trapNum: UInt16): UniversalProcPtr;
  65.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  66.     INLINE $301F, $A146, $2E88;
  67.     {$ENDC}
  68. PROCEDURE SetTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16);
  69.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  70.     INLINE $301F, $205F, $A047;
  71.     {$ENDC}
  72. {$ENDC}
  73. FUNCTION NGetTrapAddress(trapNum: UInt16; tTyp: TrapType): UniversalProcPtr;
  74. PROCEDURE NSetTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16; tTyp: TrapType);
  75. FUNCTION GetOSTrapAddress(trapNum: UInt16): UniversalProcPtr;
  76.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  77.     INLINE $301F, $A346, $2E88;
  78.     {$ENDC}
  79. PROCEDURE SetOSTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16);
  80.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  81.     INLINE $301F, $205F, $A247;
  82.     {$ENDC}
  83. FUNCTION GetToolTrapAddress(trapNum: UInt16): UniversalProcPtr;
  84.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  85.     INLINE $301F, $A746, $2E88;
  86.     {$ENDC}
  87. PROCEDURE SetToolTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16);
  88.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  89.     INLINE $301F, $205F, $A647;
  90.     {$ENDC}
  91. FUNCTION GetToolboxTrapAddress(trapNum: UInt16): UniversalProcPtr;
  92.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  93.     INLINE $301F, $A746, $2E88;
  94.     {$ENDC}
  95. PROCEDURE SetToolboxTrapAddress(trapAddr: UniversalProcPtr; trapNum: UInt16);
  96.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  97.     INLINE $301F, $205F, $A647;
  98.     {$ENDC}
  99. {$IFC TARGET_CPU_PPC }
  100. FUNCTION GetTrapVector(trapNumber: UInt16): UniversalProcHandle;
  101. {$ENDC}
  102. {$ENDC}  {TARGET_OS_MAC}
  103.  
  104. {$ALIGN RESET}
  105. {$POP}
  106.  
  107. {$SETC UsingIncludes := PatchesIncludes}
  108.  
  109. {$ENDC} {__PATCHES__}
  110.  
  111. {$IFC NOT UsingIncludes}
  112.  END.
  113. {$ENDC}
  114.